package com.qfedu.openplateform.manager.service.impl;

import com.qfedu.openplateform.manager.dao.AppInfoMapper;
import com.qfedu.openplateform.manager.entity.AppInfo;
import com.qfedu.openplateform.manager.service.AppInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class AppInfoServiceImpl implements AppInfoService {

    @Autowired
    private AppInfoMapper appInfoMapper;

    @Override
    public List<AppInfo> findAllAppInfo() {

        List<AppInfo> allAppInfo = appInfoMapper.findAllAppInfo();

        return allAppInfo;
    }

    @Override
    public int updateAppInfo(AppInfo appInfo) {

        int i = appInfoMapper.updateAppInfo(appInfo);

        return i;
    }

    @Override
    public int deleteAppInfo(Integer id) {

        int i = appInfoMapper.deleteAppInfo(id);

        return i;
    }

    @Override
    public List<AppInfo> findAppInfoByName(AppInfo appInfo) {

        List<AppInfo> appInfoByName = appInfoMapper.findAppInfoByName(appInfo);

        return appInfoByName;
    }

    @Override
    public int addInfo(AppInfo appInfo) {

        int i = appInfoMapper.addInfo(appInfo);

        return i;
    }

    @Override
    public int updateInfo(AppInfo appInfo) {

        int i = appInfoMapper.updateInfo(appInfo);

        return i;
    }
}
